package com.rongke.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.rongke.mapper.BuyTogetherGoodsMapper;
import com.rongke.model.BuyTogetherGoods;
import com.rongke.model.Orders;
import com.rongke.service.AccountService;
import com.rongke.service.BuyTogetherGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @BuyTogetherGoodsServiceImpl
 * @拼团商品ServiceImpl
 * @version : Ver 1.0
 */
@Service
public class BuyTogetherGoodsServiceImpl extends ServiceImpl<BuyTogetherGoodsMapper, BuyTogetherGoods> implements BuyTogetherGoodsService {

    @Autowired
    private BuyTogetherGoodsMapper buyTogetherGoodsMapper;
    @Autowired
    private AccountService accountService;
    /**
     * @根据条件查找拼团商品
     * @param buyTogetherGoods
     * @return
     */
    @Override
    public List<BuyTogetherGoods> selectByCondition(BuyTogetherGoods buyTogetherGoods) {
        return buyTogetherGoodsMapper.selectByCondition(buyTogetherGoods);
    }

    @Override
    public BuyTogetherGoods selectViaId(Long id) {
        return buyTogetherGoodsMapper.selectViaId(id);
    }

    @Override
    public List<BuyTogetherGoods> selectTogGoodsList(Map map) {
        return buyTogetherGoodsMapper.selectTogGoodsList(map);
    }

    @Override
    public BuyTogetherGoods selectTogetherGoods(Map map) {
        return buyTogetherGoodsMapper.selectTogetherGoods(map);
    }

    @Override
    public JSONObject refund(List<Orders> ordersList) {
        JSONObject jsonObject=new JSONObject();


        return null;
    }


}
